package com.ny.service.impl;
import com.ny.dao.StudentDao;

import com.ny.dao.impl.StudentDaoimpl;
import com.ny.entity.Student;
import com.ny.service.StudentService;

import java.sql.SQLException;
import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoimpl();
    public StudentServiceImpl() throws SQLException, ClassNotFoundException {
    }
    @Override
    public int add(Student student) throws SQLException, ClassNotFoundException {
        return studentDao.add(student);

    }

    @Override
    public Student login(String studentName, String studentPassword) throws SQLException {

        return studentDao.login(studentName,studentPassword);
    }

    @Override
    public int delete(int studentId1) {
        return 0;
    }

    @Override
    public int update(Student student1) {
        return 0;
    }

    @Override
    public List<Student> findAllStudent() {
        return null;
    }

    @Override
    public int updatePhone(int studentID, String newPhone) {
        return 0;
    }

    @Override
    public int updatePassword(int studentID, String newPassword) {
        return 0;
    }
}
